package com.sp.pay.common;


import com.sp.pay.dto.company.CompanyDto;
import com.sp.pay.dto.company.CompanyParameterDto;

import java.util.concurrent.ConcurrentHashMap;

public class CacheUtil {

    private final static ConcurrentHashMap<String, CompanyDto> companyCache = new ConcurrentHashMap<String, CompanyDto>(32);

    private final static ConcurrentHashMap<String, CompanyParameterDto> companyParaCacheUrl = new ConcurrentHashMap<String, CompanyParameterDto>(32);

    public static void putCompany(String key,CompanyDto companyDto){
        companyCache.put(key,companyDto);
    }

    public static CompanyDto getCompangy(String key){
        return companyCache.get(key);
    }

    public static void putCompanyPara(String key,CompanyParameterDto companyParameterDto){
        companyParaCacheUrl.put(key,companyParameterDto);
    }

    public static CompanyParameterDto getCompanyPara(String key){
        return companyParaCacheUrl.get(key);
    }
}
